#include <stdio.h>
int main(){
	int num = 0;
	int sum = 0;
	scanf("%d",&num);
	int temp = num;
	int* p = &num;
	for(int i = 0; i < 5; i++){
		sum += *p;
		*p = (*p)*10+temp;
		printf("%d\n",sum);
	}
	printf("%d\n",sum);
    return 0;
}
